package com.xmb.wcapi.constant;

public enum SpecConstant {

    A("A件", "Panel"),

    B("B件", "Bezel"),

    C("C件", "U-case"),

    D("D件", "L-case"),

    Others("Others", "Shutter/Power Button/RJ 45Door/Cap/KB 框");

    public String code;

    public String message;

    SpecConstant(String code, String message){

        this.code = code;
        this.message = message;
    }

    public static String getMessage(String code) {
        for (SpecConstant c : SpecConstant.values()) {
            if (c.getCode().equals(code)) {
                return c.message;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
